Open-Source Real-Time Face Swapping Suddenly Goes Viral

It’s odd how this project has suddenly gained attention. When it was first open-sourced last year, no one noticed it. Now, a year later, everyone has discovered it. I also found it strange—when I first saw it last year, I didn’t pay much attention, but today, it suddenly caught my eye again.

In reality, if you take a closer look at this project, it’s pretty impressive. Even a quick glance shows it’s quite remarkable. However, advanced technology should be used wisely; otherwise, it can have serious consequences. Trust me, you can watch, learn, and use it, but don’t mess around with it recklessly.

Project Introduction

Deep-Live-Cam is designed to enable real-time facial replacement and one-click face swapping in videos using just a single image. Leveraging deep learning technology, users can replace faces in videos with simple operations. This tool is ideal for creative media production, such as animating characters or fashion showcases. The developers have implemented several security checks to prevent misuse of the software.

This doesn’t just swap faces! It even adapts the lighting to the swapped face, and it performs well even in low-light conditions.

Usage

(This article only briefly explains this part; refer to GitHub for detailed instructions)

  1. Environment Setup: Ensure your computer has Python, PyTorch, and other necessary software and libraries installed.

  2. Download Code: Download the project code from the GitHub repository.

  3. Install Dependencies: Use the command pip install -r requirements.txt to install the required Python dependencies.

  4. Prepare Data: Prepare a facial image for the face replacement in the video.

  5. Run Script: Execute the main script and input the necessary parameters, such as the video path and image path, as prompted in the command line.

  6. Generate Video: The script will process the input video and replace the faces with the specified image, producing a new video.

To use Deep-Live-Cam in webcam mode, follow these steps:

  1. Select a facial image as the replacement source.

  2. Click the “Live” button to start capturing webcam video.

  3. Wait 10 to 30 seconds, and the preview video will display the face replacement effect.

If you want to change the facial image, select a new image, and the preview will automatically restart. Please wait for a moment. You can use screen capture software like OBS for streaming. Additionally, various video output settings, such as output path, video quality, and encoder, can be adjusted via command line parameters.

Note!!! Be sure to use this legally!!!

Project Link

https://github.com/hacksider/Deep-Live-Cam